# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=wgetpaste
pkgver=2.30
pkgrel=0
pkgdesc="Command-line interface to various pastebins"
url="http://wgetpaste.zlin.dk/"
arch="noarch"
license="MIT"
depends="wget bash"
options="!check" # no tests
subpackages="$pkgname-zsh-completion:zsh:noarch"
source="$pkgname-$pkgver.tar.gz::https://github.com/zlin/wgetpaste/archive/$pkgver.tar.gz"

package() {
	install -Dm755 wgetpaste "$pkgdir"/usr/bin/wgetpaste
	install -Dm644 _wgetpaste "$pkgdir"/usr/share/zsh/site-functions/_wgetpaste
}

zsh() {
	pkgdesc="Zsh completion for wgetpaste"
	install_if="$pkgname=$pkgver-r$pkgrel zsh"

	mkdir -p "$subpkgdir"/usr/share/zsh/site-functions
	mv "$pkgdir"/usr/share/zsh/site-functions/* \
		"$subpkgdir"/usr/share/zsh/site-functions
}
sha512sums="bff81962967b8deaddd30c4007d81550e5510fbbf0754c109630f35a2a0b82c2ae1029822d0bd9e4918a66c41cf08cc7b3566aac4cb42415215adc2f8be43a70  wgetpaste-2.30.tar.gz"
